package com.majun.huaxishe.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 相册表
 * </p>
 *
 * @author 马骏
 * @since 2024-02-29
 */
@Data
@Builder
@TableName("album")
@AllArgsConstructor
@NoArgsConstructor
public class Album implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 相册名字
     */
    @TableField("name")
    private String name;

    /**
     * 封面照片名字
     */
    @TableField("cover_name")
    private String coverName;

    /**
     * 封面照片路径
     */
    @TableField("cover_url")
    private String coverUrl;

    /**
     * 是否展示 1:是 0:否
     */
    @TableField("status")
    private Integer status;

    /**
     * 权重
     */
    @TableField("weight")
    private Integer weight;

    /**
     * 所属主题id
     */
    @TableField("theme_id")
    private Integer themeId;
    /**
     * 相册上传时间
     */
    @TableField("upload_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime uploadTime;

    @TableField("show_theme_name")
    private Integer showThemeName;
}
